package org.yn.dept.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat;
import org.yn.emp.domain.Employee;

import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Slf4j
public class Department {
    private Long id;
    private String name;
    private String intro;
    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")//后端向前台传值
    @DateTimeFormat(pattern = "yyyy-MM-dd")//前端向后端传入的时间
    private Date createTime;

    @JsonFormat(pattern="yyyy-MM-dd",timezone="GMT+8")//后端向前台传值
    @DateTimeFormat(pattern = "yyyy-MM-dd")//前端向后端传入的时间
    private Date updateTime;
    private Employee manager;
    private Department parent;
    private String path;
    private String state;
    private List<Department> children;

}